package main.test.SparkAPI.Baics;

import java.util.ArrayList;
import java.util.stream.IntStream;

/**
 * arrays and foreach usage
 */
public class hell {
    public static void main(String[] args) {
        ArrayList<Integer> x =  new ArrayList<>();
        int[] arr = {2,5,3};
        for(int x1:arr) {
            System.out.println(x1);
        }

        int[][] arr1 = {{1,2},{3,4}};
             System.out.println("-----foreach输出二维数组");
             for(int[] xx:arr1) {
                  for(int e:xx) {
                          System.out.print(e+ " ");//逐个输出数组元素，多维数组的本质就是没有多维数组
                      }
                 }
             System.out.println();
         }
}

